﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using ArlesInterfaces.Render;

namespace Arles.src.controller.Commands
{
    public class FillModeCommand : Command<IRender>
    {
        FillMode newState;
        FillMode lastState;

        public FillModeCommand(IRender render, FillMode newState)
            : base(render,"RenderOptions")
        {
            this.newState = newState;   
        }

        public override void Execute()
        {
            lastState = receiver.RenderFillMode;
            receiver.RenderFillMode = newState;
        }

        public override void Undo()
        {
            receiver.RenderFillMode = lastState;
        }

        public override string toString()
        {
            return newState.ToString();
        }
    }
}
